extends "../calxJS_Hide/calxJS_Hide.gd"
func _init():
	pass
func _extInit():
	._extInit()
	chaName = "奇奇"                   # 角色的名称
	attCoe.atkRan = 1                 # 攻击距离
	attCoe.maxHp = 6                 # 最大生命（每点代表112.5基础数值，取整数，下同）
	attCoe.atk = 6.5                    # 攻击力（每点代表8.5）
	attCoe.mgiAtk = 3.2                 # 魔法攻击（每点代表13.7）
	attCoe.def = 4.5                    # 物理防御（每点代表15）
	attCoe.mgiDef = 4.5                 # 魔法防御（每点代表16.6）
	atkEff = "atk_dao" 
	xb = "光"
	lv = 3   
	addSkillTxt("[乾坤一掷]甩动尾巴攻击目标亚比，造成120%光系物理伤害，40%概率削弱目标物防20%4秒[CD:7]")
	addSkillTxt("[光之复刻]复刻之光照耀我方全体，恢复25%已损失体力值并有30%概率提升双防各10%，最高至60%[CD:14]")
	addSkillTxt("[天堂之光]召唤天堂之光照耀目标，扣除自身25%当前体力后，造成160%光系物理伤害，并清空目标增益[CD:11]")
	addCdSkill("qkyz",7)
	addCdSkill("gzfk",14)
	addCdSkill("ttzg",11)

func _castCdSkill(id):
	._castCdSkill(id)
	if id == "qkyz":
		var eff = sys.newEff("numHit", position, false, 1)
		eff.setText("乾坤一掷", "#FF0099")
		eff.anim.set_speed_scale(0.2)
		typeHurtCha(aiCha,att.atk*1.2,Chara.HurtType.PHY,Chara.AtkType.SKILL)
		if sys.rndPer(40):
			addBuff(wukang3.new(4))
	if id == "gzfk":
		var chas = getAllChas(2)
		for i in chas:
			i.plusHp((att.maxHp-att.hp)*0.25)
			if sys.rndPer(30):
				var buff = hasBuff("wukang1")
				var buff1 = hasBuff("mokang1")
				if buff == null:
					addBuff(bf.wukang1.new())
				elif buff.att.defL < 0.6:
					buff.att.defL += 0.1
				if buff1 == null:
					addBuff(bf.mokang1.new())
				elif buff1.att.mgiDefL  < 0.6:
					buff1.att.mgiDefL += 0.1
	if id == "ttzg":
		var eff = sys.newEff("numHit", position, false, 1)
		eff.setText("天堂之光", "#FF0099")
		eff.anim.set_speed_scale(0.2)
		plusHp(-att.hp*0.25)
		typeHurtCha(aiCha,att.atk*1.6,Chara.HurtType.PHY,Chara.AtkType.SKILL)
		for j in aiCha.buffs:
			if not j.isNegetive && j.get("type") != config.EQUITYPE_EQUI && j.get("dispelable") != true:
				j.isDel = true


class wukang3:
	extends Buff
	func _init(lv = 1):
		attInit()
		isNegetive=true
		var dispelable = false
		life = lv
		id = "wukang3"	
		att.defL -= 0.3